﻿using System;
using System.Collections.Generic;
using System.Text;

using DupeKill.Core.IO; 

namespace DupeKill.Core.Comparison
{
    public class FileSetComparerFactory 
    {
        private IFileSystemGateway fileSystem;

        public FileSetComparerFactory()
            : this(FileSystemGatewayFactory.Create())
        {

        }

        public FileSetComparerFactory(IFileSystemGateway fileSystem)
        {
            if (fileSystem == null)
                throw new ArgumentNullException();

            this.fileSystem = fileSystem; 
        }

        public IFileSetComparer CreateByLengthComparer()
        {
            return new ByLengthFileSetComparer(); 
        }

        public IFileSetComparer CreateByContentComparer(int chunkSize)
        {
            return new ByContentFileSetComparer(fileSystem, chunkSize); 
        }
    }
}
